#!/bin/bash

# set -e # exit on error
# set -x # echo commands

if [[ -z "${SAUCE_USERNAME}" ]] || [[ -z "${SAUCE_ACCESS_KEY}" ]]; then
    echo
    echo "SKIPPING SAUCELABS TESTS --- external committer"
    echo
    exit 0
fi

py.test -m integration              \
    --driver SauceLabs              \
    --self-contained-html           \
    --html=tests/pytest-report.html \
    --upload -n4 -r3
